<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="autor" content="Breezy New Media (info@breezy.cz)" />
<meta name="copyright" content="PointSpace - free website layout 2008" />
<meta name="description" content=""  />
<meta name="keywords" content="" />
<title>Advanced Databases TUE - Search Users</title>
<link rel="stylesheet" type="text/css" href="./css/default.css" media="screen" />
<link rel="stylesheet" type="text/css" href="./css/print.css" media="print" />
</head>
<f:view>
<body>

<div id="view">
  <div id="head">
    <div id="logo">
      <a href="" class="block">&nbsp;</a>
      <h1><a href="index.html">advanced<span>Databases</span></a></h1>
      <h2><a href="index.html">the music you are looking for..!</a></h2>
    </div>
    <hr class="hidden" />
    
    <jsp:include page="userMenu.jsp"/>
    
    <hr class="hidden" />
  </div>
  
  <div id="content">
    <div id="contentBlock" style="height:100%;">
      <div class="item last">
      </div>
      <div class="col1" style="width:600px;height:100%">
        <div class="item">
          <h3>User Search</h3>
			<h:form>
				<table>
					<tr>
						<td>
							<h:outputLabel styleClass="" value="Username"></h:outputLabel>
						</td>
						<td>
							<h:inputText styleClass="button" size="60" value="#{userBean.loginID}"></h:inputText>
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel styleClass="" value="Name"></h:outputLabel>
						</td>
						<td>
							<h:inputText styleClass="button" size="60" value="#{userBean.name}"></h:inputText>
						</td>
					</tr>
					<tr>
						<td>
							<h:outputLabel styleClass="" value="Country"></h:outputLabel>
						</td>
						<td>
							<h:inputText styleClass="button" size="60" value="#{userBean.country}"></h:inputText>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<h:commandButton styleClass="submit" action="#{userBean.searchUsers}" value="Search"></h:commandButton>
						</td>
					</tr>
				</table>
			</h:form>
        </div>
        <div class="item last">
			<div>
				<h:form>
				<h:outputLabel styleClass="" value="#{userBean.numberUsers}"></h:outputLabel>
				<h:dataTable style="border-width:0" value="#{userBean.users}" var="item">
					<h:column>
						<table style="padding:0">
							<tr>
								<td>
									<h:outputText style="display:block" value="#{item.firstName}"/>
								</td>
								<td>
									<h:outputText style="display:block" value="#{item.lastName}"/>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<b><h:outputText style="display:block" value="#{item.loginId}"/></b>
								</td>
							</tr>
							<tr>
								<td colspan="2">
									<h:commandLink action="userInfo" value="View">
										<f:param name="userKey" value="#{item.userID}"></f:param>
									</h:commandLink>
								</td>
							</tr>							
						</table>						
					</h:column>
				</h:dataTable>	
				</h:form>
			</div>            
        </div>
      </div>
      <!-- /#cols 50:50 -->
      
    </div>
    <hr class="hidden" />
    
  </div>
  
  
  
  <hr class="hidden" />
  <ul class="hidden">
    <li><a href="#view"></a></li>
    <li><a href="#content"></a></li>
  </ul>
  <hr class="hidden" />
  
  <div id="foot">
    <p class="fl">&copy; all rights reserved</p>
    
    
    
    <!-- /#   LINKS AND AUTHOR-SIGNATURE CANNOT BE REMOVED !!! -->
    <p class="fr"><a href="www.tue.nl" title="See more ON">TUE</a> created by <a href="http://www.tue.nl" class="ico ico-breezy">TUE</a></p>
  </div>
</div>

</body>
</f:view>
</html>
